package com.example.demo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
//@AllArgsConstructor
@NoArgsConstructor
public class fans {
    private Integer fansId;
    private String name;
    private Integer age;
    private Integer gender;//0表示女，1表示男
    private YYQX yyqx;//可以这样定义对象
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;//要导util下的包，导sql下的会报错
    //private String pictureName;

    public fans(Integer fansId, String name, Integer age,Integer gender, YYQX yyqx) {
        this.fansId = fansId;
        this.name = name;
        this.age = age;
        this.gender=gender;
        this.yyqx = yyqx;
        //默认创建日期
        this.date = new Date();
    }
}
